package com.xmb.common.config;

import com.xmb.common.interceptor.PrepareInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by lyndon on 2019/3/26.
 */
@Configuration
@MapperScan("com.xmb.common.dao")
public class MybatisConfiguration {

    /**
     * 前置拦截器,主要功能是插入前设置ID
     */
    @Bean
    public PrepareInterceptor idInterceptor() {
        return new PrepareInterceptor();
    }
}
